package dao;

import domain.Goods;
import domain.Supplier;
import domain.User;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface SupplierDao {
    Supplier selectById(long id);

    int insert(Supplier supplier);

    int update(Supplier supplier);

    int delete(int id);

    List<Supplier> selectAll();

    User selectByManageId(long id);

    /**
     *
     * @param supplierID
     * @param goodsID
     * @param number
     * @return
     */
    int supplyGoods(@Param("supplierID") Integer supplierID, @Param("goodsID") Integer goodsID, @Param("number") Integer number);

    String selectClassificationByGoodsName(String name);

    List<Goods> selectGoodsBySupplierId(Long id);

    int countSupplier();

    HashMap findMostSupplier();

    List<Goods> findGoodsById(Integer id);

    List<HashMap>findGoodsOfSupplier(Long id);
}
